<template>
  <div>
    <h2>TsCard</h2>
    <div>{{ time }}</div>
  </div>
</template>
<script setup>
import { onUnmounted, ref } from 'vue';
const time = ref('')
const h = setInterval(() => {
  time.value = new Date().toLocaleString();
  console.log('time');
}, 1000)
onUnmounted(() => {
  console.log('onUnmounted');
  clearInterval(h);
})
</script>